home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / graphics / blit.arc / blitter.man
Text File  |  1988-05-20  |  47KB  |  1,253 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.                                        ****
  23.                                        ****
  24.                                        ****
  25.                                       ******
  26.                                      ** ** **
  27.                                     **  **  **
  28.                                   **    **    **
  29.  
  30.                            User Manual for the Atari ST
  31.  
  32.                       Bit-Block Transfer Processor (BLiTTER)
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.                                The Atari Corporation
  41.  
  42.                                Sunnyvale, California
  43.  
  44.                                    15 June 1987
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.                                  TABLE OF CONTENTS
  70.  
  71.  
  72.           Introduction ......................................    1
  73.  
  74.                Bit-Block Transfers ..........................    2
  75.                Bit-Block Transfer ...........................    3
  76.  
  77.           Functional Description ............................    3
  78.  
  79.           Programming Model .................................    5
  80.                Register Map .................................    5
  81.                Bit-Block Addresses ..........................    5
  82.                     Source X Increment ......................    6
  83.                     Source Y Increment ......................    6
  84.                     Destination Address .....................    6
  85.                     Destination X Increment .................    6
  86.                     Destination Y Increment .................    6
  87.                     X Count .................................    7
  88.                     Y Count .................................    7
  89.                Bit-Block Alignments .........................    7
  90.                     Endmask 1, 2, 3 .........................    7
  91.                     Skew ....................................    7
  92.                     FXSR ....................................    7
  93.                     NSFR ....................................    8
  94.                Logic Operations .............................    8
  95.                     Logic Operations ........................    8
  96.                Halftone Operations ..........................    8
  97.                     Halftone RAM ............................    8
  98.                     Line Number .............................    8
  99.                     Smudge ..................................    9
  100.                     Halftone Operations .....................    9
  101.                Bus Accesses .................................    9
  102.                     Hog .....................................    9
  103.                     Busy ....................................    9
  104.  
  105.           Appendix A -- Programming Example .................    10
  106.        
  107.           Appendix B -- References ..........................    17
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.      THE SCOPE  OF THIS  DOCUMENT is limited to a functional description of the
  135.      Atari ST BLiTTER.   This document  is not  a data  sheet for  system inte-
  136.      gration, rather  it is  a user  manual for  system programming.   For more
  137.      information, please refer to the texts listed at the end of this document.
  138.  
  139.  
  140.      *** INTRODUCTION
  141.  
  142.      The Atari ST Bit-Block Transfer Processor  (BLiTTER) is  a hardware imple-
  143.      mentation of  the bit-block  transfer (BitBlt)  algorithm.   BitBlt can be
  144.      simply described as a procedure that moves bit-aligned data from  a source
  145.      location to  a destination  location through a given logic operation.  The
  146.      BitBlt primitive can be used to perform such operations as:
  147.  
  148.           o  Area seed filling
  149.           o  Rotation by recursive subdivision
  150.           o  Slice and smear magnification
  151.           o  Brush line drawing using Bresenham DDA
  152.           o  Text transformations (eg. bold, italic, outline)
  153.           o  Text scrolling
  154.           o  Window updating
  155.           o  Pattern filling
  156.  
  157.      And general memory-to-memory block copying [1].
  158.  
  159.      The heart of BitBlt was first  formally defined  by Newman  and Sproull in
  160.      their  description  of  the  function  RasterOp [2].  As defined, RasterOp
  161.      performed its block transfers on a bit-by-bit basis  and was  limited to a
  162.      small  subset  of  possible  source  and destination Boolean combinations.
  163.      Enhancements to  RasterOp such  as processing  bits in  parallel or intro-
  164.      ducing  a  halftone  pattern  into  the  transfer  were  literally left as
  165.      exercises for the reader.
  166.  
  167.      In an effort to improve the functionality and performance of  the original
  168.      algorithm,  the   prescribed  enhancements   were  incorporated  into  the
  169.      definition of RasterOp and implemented in  hardware  as the  RasterOp Chip
  170.      [3].    However  the  RasterOp  Chip  lacked the two-dimensionality of the
  171.      original function and suffered from a performance bottleneck caused by the
  172.      loading and  reloading of  source, destination,  and halftone data (ie. it
  173.      could not DMA).
  174.  
  175.      While efforts were being made to improve the performance of  RasterOp, the
  176.      formal definition  of RasterOp was further refined and became the basis of
  177.      the BitBlt copyLoop primitive in  the  Smalltalk-80  graphics  kernel [4].
  178.      Because of  its comprehensive  interface definition,  the BitBlt primitive
  179.      was inefficient and required special-case optimizations  that violated its
  180.      general-purpose  nature.    Clearly  a  hardware solution was necessary to
  181.      increase the performance of  the BitBlt  copyLoop without  sacrificing its
  182.      functionality.
  183.  
  184.      The Atari ST BLiTTER is a hardware solution to the performance problems of
  185.      BitBlt.  The BLiTTER is a  DMA  device  that  implements  the  full BitBlt
  186.      copyLoop definition  with the addition  of a few minor extensions.  Single
  187.      word or multi-word increments and decrements are provided for transfers to
  188.      destinations in Atari ST video display memory.  A center mask, which would
  189.      otherwise be  a constant  all ones,  is   also provided  for an additional
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.                             Atari BLiTTER doc - page 1
  197.  
  198.  
  199.  
  200.      level of texture.  The remainder of this document is directly based on the
  201.      original functional description of the Atari ST BLiTTER.  
  202.  
  203.  
  204.      *** BIT-BLOCK TRANSFERS
  205.  
  206.      As previously stated, a bit-block transfer can be described as a procedure
  207.      that  moves  bit-aligned  data  from  a  source  location to a destination
  208.      location through  a  given  logic  operation.    There  are  sixteen logic
  209.      combination rules  associated with  the merging  of source and destination
  210.      data.  Note that  this  set  contains  all  possible  combinations between
  211.      source and  destination.   The following  table contains  the valid BitBlt
  212.      combination rules:
  213.  
  214.           LOGIC OPERATIONS  
  215.           (~s&~d)|(~s&d)|(s&~d)|(s&d)  
  216.                      _______________________________________
  217.                     |    |                                  |
  218.           MSB LSB   | OP | COMBINATION RULE                 |
  219.                     |    |                                  |
  220.           0 0 0 0   | 0  | all zeros                        |
  221.           0 0 0 1   | 1  | source AND destination           |
  222.           0 0 1 0   | 2  | source AND NOT destination       |
  223.           0 0 1 1   | 3  | source                           |
  224.           0 1 0 0   | 4  | NOT source AND destination       |
  225.           0 1 0 1   | 5  | destination                      |
  226.           0 1 1 0   | 6  | source XOR destination           |
  227.           0 1 1 1   | 7  | source OR destination            |
  228.           1 0 0 0   | 8  | NOT source AND NOT destination   |
  229.           1 0 0 1   | 9  | NOT source XOR destination       |
  230.           1 0 1 0   | A  | NOT destination                  |
  231.           1 0 1 1   | B  | source OR NOT destination        |
  232.           1 1 0 0   | C  | NOT source                       |
  233.           1 1 0 1   | D  | NOT source OR destination        |
  234.           1 1 1 0   | E  | NOT source OR NOT destination    |
  235.           1 1 1 1   | F  | all ones                         |
  236.                     |____|__________________________________|
  237.  
  238.  
  239.      Adjustments to block extents and  several  other  transfer  parameters a